<div class="select-box layui-form">
    
    <form action="detail-statistic.php" >
    
    <div class="layui-form-item">
    <label class="layui-form-label">时间</label>

    <div class="layui-input-block">
        <input type="text" name="select_startday" placeholder="请输入开始时间" autocomplete="off" class="layui-input"
               onclick="laydate({istime: true, format: 'YYYY-MM-DD'})" style="float: left; width: 112px"
               value="<?if($_REQUEST['select_startday']){echo $_REQUEST['select_startday'] ;}else{echo date('Y-m-01');} ?>" >

        <span style="float: left;margin: 0 4px; line-height: 30px;">-</span>

        <input type="text" name="select_endday" placeholder="请输入结束时间" autocomplete="off" class="layui-input"
               onclick="laydate({istime: true, format: 'YYYY-MM-DD'})"  style="float: left; width:112px"
               value="<?if($_REQUEST['select_endday']){echo $_REQUEST['select_endday'] ;}else{echo date('Y-m-31');} ?>"  >
 
        <input type="hidden" name="tab"  value="case" >
        <input type="hidden" name="sys_part"  value="employee" >
        <input type="hidden" name="nid"  value="<?echo $_REQUEST['nid']?>" >

    </div>


</div>

    <button class="layui-btn  layui-btn-sm" ><i class="layui-icon">&#xe615;</i> 查找</button>
    <button class="layui-btn  layui-btn-sm" type="reset" ><i class="layui-icon">&#xe615;</i> 重置</button>

</form>


</div>


<table class="layui-table">
    <colgroup>
        <col width="55">
        <col width="120">
        <col width="300">
        <col width="100">
        <col >
        <col >
        <cool >
        <col >


    </colgroup>
    <thead>
    <tr>
        <th></th>
        <th>客户</th>
        <th>名称</th>
        <th>状态</th>
        <th>时间</th>
        <th>结算时间</th>
        <th>岗位</th>
        <th>总额</th>
        <th>实际金额</th>
    </tr>
    </thead>
    <tbody>

    <tr>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td><?echo sum_with_key_in_2d_array($case_list,'sum')?></td>

    </tr>


    <?php
    for ($i = 0; $i < count($case_list); $i++)
    {?>


        <tr id="item<?echo $case_list[$i]['nid']?>" <?if($applymodify['nid']){echo "style='color:red'";$status="审核中";}else{$status="正常";}?>>


            <td><?echo $i+1+$plate['page_list_num']*($nowpageid-1) ?></td>
            <td>
                <a href="../../unit/view/detail-statistic.php?sys_part=unit&nid=<?echo $case_list[$i]['unit']?>">
                    <?echo $unit_name_list[$case_list[$i]['unit']]?>
                </a>
            </td>

            <td>
                <a href="../../case/view/detail-info.php?sys_part=case&nid=<?echo $case_list[$i]['nid']?>">
                <?echo $case_list[$i]['name']?>
                </a>

            </td>

            <td><span  <?if($case_list[$i]['status']=='进行中'){echo "class='layui-badge'  style='background-color:#ff9900'";}?>> <?echo $case_list[$i]['status']?></span></td>

            <td><?echo substr($case_list[$i]['startdate'],0,10)?> - <?echo substr($case_list[$i]['enddate'],0,10)?> / <?echo count_days($case_list[$i]['startdate'],$case_list[$i]['enddate'])?> 日 </td>




            <td><?echo substr($case_list[$i]['count_date'],0,10)?></td>

            <td>
                <?if($case_list[$i]['sales']=$_REQUEST['nid']){echo "开发业务";}?>
            </td>



            <td><?echo $case_list[$i]['contract_sum']?></td>
            <td><?echo $case_list[$i]['sum']?></td>

        </tr>
    <?}?>



    </tbody>
</table>

